﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Blizzard.Scripts
{
    public class Table
    {

        private string _name;
        private List<Field> _fields = new List<Field>();
   
        public Table(string name )
        {
            _name = name;
        }


        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string IdentityFieldName { get; set; }


        /// <summary>
        /// List of table Fields
        /// </summary>
        public List<Field> Fields { get { return _fields; } set { _fields = value; } }




        public class Field
        {

            string _name;
            Type _type;
       

            public Field(string name  , Type dotNetFieldType)
            {
                _name = name;
                _type = dotNetFieldType;
            }


            public string Name
            {
                get { return _name; }
                set { _name = value; }
            }

            public Type DotNetFieldType
            {
                get { return _type; }
                set { _type = value; }
            }

        }

    }
}
